#include "..\..\NUnit\NUnitModule.h"
Declare_Collections_IEqualityComparer(System_String, string)
Declare_Collections_EqualityComparer(System_String, string)

//#region Sample

public class(SampleEqualityComparer,Collections_EqualityComparer(System_String),,
);
Declare_DefaultCtor(public,SampleEqualityComparer)

/*[ Equals ] */
private_ bool space(SampleEqualityComparer,Equals)(Collections_EqualityComparer(System_String) *t, string x, string y)
{
	return (x == y);
}
/*[ GetHashCode ] */
private_ int_ space(SampleEqualityComparer,GetHashCode)(Collections_EqualityComparer(System_String) *t, string obj)
{
	return 1;
}
Implement_Type(SampleEqualityComparer,Collections_EqualityComparer(System_String),,
	System_ObjectVector *vtable = t->Collections_EqualityComparer(System_String).__vtable;
	vtable[_Collections_EqualityComparer_System_StringVIndex_Equals] = (System_ObjectVector)&space(SampleEqualityComparer,Equals);
	vtable[_Collections_EqualityComparer_System_StringVIndex_GetHashCode] = (System_ObjectVector)&space(SampleEqualityComparer,GetHashCode);
)
Implement_DefaultCtor(SampleEqualityComparer,Collections_EqualityComparer(System_String))

//#endregion Sample

private_ static_ void Constructor_Valid_NotNull()
{
	SampleEqualityComparer *comparer = new(,SampleEqualityComparer);
	NUnit_Assert_oIsNotNull(comparer);
}

private_ static_ void Equals_Valid_EqualsTrue()
{
	SampleEqualityComparer *comparer = new(,SampleEqualityComparer);
	NUnit_Assert_bIsTrue(vcallT(Collections_EqualityComparer,System_String,comparer,Equals, L"test", L"test"));
}

private_ static_ void GetHashCode_Valid_NotEqualZero()
{
	SampleEqualityComparer *comparer = new(,SampleEqualityComparer);
	NUnit_Assert_iAreNotEqual(1, vcallT(Collections_EqualityComparer,System_String,comparer,GetHashCode, L"test"));
}

private_ static_ void getDefault_Valid_NotNull()
{
	NUnit_Assert_oIsNotNull(getsT(Collections_EqualityComparer,System_String,Default));
}

///<summary>
/// RunTests
///</summary>
public static_ void space(Collections_EqualityComparerFixture,RunTests)()
{
	Test(Constructor_Valid_NotNull);
	Test(Equals_Valid_EqualsTrue);
	Test(GetHashCode_Valid_NotEqualZero);
	Test(getDefault_Valid_NotNull);
}